﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<head>
        <meta charset="UTF-8">
        <title>Table</title>

        <link rel="stylesheet" href="../static/plugins/layui/css/layui.css" media="all" th:href="@{plugins/layui/css/layui.css}"/>
        <link rel="stylesheet" href="../static/css/global.css" media="all" th:href="@{css/global.css}">
        <link rel="stylesheet" href="../static/plugins/font-awesome/css/font-awesome.min.css" th:href="@{plugins/font-awesome/css/font-awesome.min.css}">
        <link rel="stylesheet" href="../static/css/table.css" th:href="@{css/table.css}"/>
        <!--<link rel="stylesheet" href="../static/css/btable.css" th:href="@{css/btable.css}"/>-->

        <style type="text/css">
            .layui-form input[type=checkbox],.layui-form input[type=radio],.layui-form select
            {
                display: inline;
            }
        </style>
	</head>




    <fieldset class="layui-elem-field">
        <legend>一级列表</legend>

	 <table class="layui-table admin-table">
		 <tr>
		 <th>序号</th>
		 <th>id</th>
		 <th>名称</th>
		 <th>指向</th>
		 <th>类型</th>
		 <th>父类id</th>
		 <th>排序</th>
		 <th>操作</th>
		 </tr>
		 <tr th:each="bean,beanStat:${navtype1}" th:object="${bean}">
			 <td th:text="${beanStat.count}"></td>
			 <td th:text="${bean.id}"></td>
			 <td th:text="${bean.title}"></td>
			 <td th:text="${bean.href}"></td>
			 <td th:text="${bean.type}"></td>
			 <td th:text="${bean.parentId}"></td>
             <td th:text="*{sort}"></td>
             <td>
                 <a th:href="@{/delNav?id={delid}(delid=*{id})}">删除</a>
             </td>
		 </tr>
	 </table>
    </fieldset>

    <fieldset class="layui-elem-field">
    <legend>二级列表</legend>
        <div class="layui-field-box layui-form">

	 <table class="layui-table admin-table">
         <tr>
             <th>序号</th>
             <th>id</th>
             <th>名称</th>
             <th>指向</th>
             <th>类型</th>
             <th>父类id</th>
             <th>排序</th>
             <th>操作</th>
         </tr>
		 <tr th:each="bean,beanStat:${navtype2}"  th:object="${bean}">
			 <td th:text="${beanStat.count}"></td>
			 <td th:text="${bean.id}"></td>
			 <td th:text="${bean.title}"></td>
			 <td th:text="${bean.href}"></td>
			 <td th:text="${bean.type}"></td>
			 <td th:text="${bean.parentId}"></td>
             <td th:text="*{sort}"></td>
			 <td>
                 <a th:href="@{/delNav?id={delid}(delid=*{id})}">删除</a>
			 </td>
		 </tr>
	 </table>
        </div>
    </fieldset>

    <fieldset class="layui-elem-field">
        <legend>三级列表</legend>

	 <table class="layui-table admin-table">
         <tr>
             <th>序号</th>
             <th>id</th>
             <th>名称</th>
             <th>指向</th>
             <th>类型</th>
             <th>父类id</th>
             <th>排序</th>
             <th>操作</th>
         </tr>

         <!--/*--><!--@thymesVar id="navtype3" type="List<com.example.demo.navigation.bean.NavBean>"--><!--*/-->
		 <tr th:each="bean,beanStat:${navtype3}" th:object="${bean}">
			 <td th:text="${beanStat.count}"></td>
			 <td th:text="*{id}"></td>
			 <td th:text="*{title}"></td>
			 <td th:text="*{href}"></td>
			 <td th:text="*{type}"></td>
			 <td th:text="*{parentId}"></td>
             <td th:text="*{sort}"></td>
             <td>
                 <a th:href="@{/delNav?id={delid}(delid=*{id})}">删除</a>
             </td>
		 </tr>
	 </table>
    </fieldset>


    <fieldset class="layui-elem-field">
    <legend>添加</legend>

        <!--/*@thymesVar id="entity" type="com.example.demo.navigation.bean.NavBean"*/-->
	  <form class="layui-form" th:action="@{/addNav}" method="post" th:object="${entity}">
          <div class="layui-form-item">
              <div class="layui-inline">
               <label class="layui-form-label">名称</label>
              <div class="layui-input-inline">
                  <input placeholder="名称" type="text" th:field="*{title}" th:errorclass="fieldError" class="layui-input"/>
              </div>
              </div>
              <div class="layui-inline">

              <label class="layui-form-label">指向</label>
              <div class="layui-input-inline">
                  <input placeholder="指向"type="text"  th:field="*{href}" th:errorclass="fieldError" class="layui-input"/>
              </div>
              </div>

              <div class="layui-inline">

                  <label class="layui-form-label">类型</label>
                  <div class="layui-form-select">
                      <!--<input placeholder="类型" type="text" th:field="*{type}" th:errorclass="fieldError" class="layui-input"/>-->
                    <select  th:field="*{type}">
                        <option value="0">一级菜单</option>
                        <option value="1">二级菜单</option>
                        <option value="2">三级菜单</option>
                    </select>
                  </div>
              </div>
              <div class="layui-inline">

                  <label class="layui-form-label">父类</label>
                  <div class="layui-input-inline">
                      <input placeholder="父类" type="text" th:field="*{parentId}" th:errorclass="fieldError" class="layui-input"/>
                  </div>
              </div>

              <div class="layui-inline">

                  <label class="layui-form-label">排序</label>
                  <div class="layui-input-inline">
                      <input placeholder="序号" type="text" th:field="*{sort}" th:errorclass="fieldError" class="layui-input"/>
                  </div>
              </div>

              <input class="layui-btn" type="submit" value="提交"/>


          </div>


      </form>

    </fieldset>


	</body>




</html>